package eureka.domain.book;

import java.io.Serializable;

import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class BasicBookItem implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private long bbID;
	private BookCategory category;
	private String name;
	private String publisher;
	private String chiefEditor;
	private String version;
	private String defaultPicture;
	
	public long getBbID() {
		return this.bbID;
	}
	public void setBbID(long bbID) {
		this.bbID = bbID;
	}

	public BookCategory getCategory() {
		return this.category;
	}
	public void setCategory(BookCategory category) {
		this.category = category;
	}

	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getPublisher() {
		return this.publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	public String getChiefEditor() {
		return this.chiefEditor;
	}
	public void setChiefEditor(String chiefEditor) {
		this.chiefEditor = chiefEditor;
	}

	public String getVersion() {
		return this.version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	
	public String getDefaultPicture() {
		return this.defaultPicture;
	}
	public void setDefaultPicture(String defaultPicture) {
		this.defaultPicture = defaultPicture;
	}
	public BasicBookItem() {
		this.bbID = 0;
		this.category = BookCategory.getDefaultInvalid();
		this.name = "";
		this.publisher = "";
		this.chiefEditor = "";
		this.version = "";
		this.defaultPicture = "";
	}
    
	public static BasicBookItem getDefaultEmpty() {
		BasicBookItem bbi = new BasicBookItem();
		bbi.bbID = 0;
		bbi.category = BookCategory.getDefaultEmpty();
		bbi.name = "";
		bbi.publisher = "";
		bbi.chiefEditor = "";
		bbi.version = "";
		bbi.defaultPicture = "";
		return bbi;
	}
	
    public JSON toJSON() {
    	return JSONSerializer.toJSON(this);
    }
}
